package com.vpen.client.hello;

import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 描述
 *
 * @author 韦鹏
 * @date 2022/11/24 17:15
 */
@RestController
@RequestMapping("send")
@RequiredArgsConstructor(onConstructor_ = @Autowired)
public class SendMsgController {

    private final HelloClientEndpoint helloClient;

    @GetMapping("{msg}")
    public String send(@PathVariable("msg") String msg) {
        helloClient.send(msg, "vpen");
        return "ok";
    }

}
